//############################################################
// FILE:  Axis_transform.h
//############################################################

#ifndef Axis_transform_H
#define Axis_transform_H

#include "stm32f10x.h"
#include "IQ_math.h"

typedef struct {  
	        int32_t  As;  		// Input: phase-a
				  int32_t  Bs;			// Input: phase-b
				  int32_t  Cs;			// Input: phase-c
				  int32_t  Alpha;		// Output:  a-axis
				  int32_t  Beta;		// Output:  b-axis
		 	 	} CLARKE ,*p_CLARKE ;

#define  CLARKE_DEFAULTS {0,0,0,0,0}

typedef struct {  
	        int32_t  Alpha;  		// Input:  a-axis
		 		  int32_t  Beta;	 	// Input:  b-axis
		 	 	  int32_t  Angle;		// Input:  angle (pu)
		 	 	  int32_t  Ds;			// Output:  d-axis
		 	 	  int32_t  Qs;			// Output:  q-axis
		 	 	  int32_t  Sine;
		 	 	  int32_t  Cosine;
		 	 	} PARK , *p_PARK ;

#define  PARK_DEFAULTS {0,0,0,0,0,0,0}

typedef struct {  
	        int32_t  Alpha;  		// Output:  d-axis
		 	 	  int32_t  Beta;		// Output:  q-axis
		 	 	  int32_t  Angle;		// Input:  angle (pu)
		 	 	  int32_t  Ds;			// Input:  d-axis
		 	 	  int32_t  Qs;			// Input:  q-axis
		 	    int32_t  Sine;		// Input: Sine
		 	    int32_t  Cosine;		// Input: Cosine
		 	    } IPARK , *p_IPARK;

#define  IPARK_DEFAULTS {0,0,0,0,0,0,0}

void  CLARKE_Cale(p_CLARKE  pV);
void  PARK_Cale(p_PARK pV)	 ;
void  IPARK_Cale(p_IPARK pV) ;

#endif /* Axis_transform*/
//===========================================================================
// End of file.
//===========================================================================
